//
//  ExpressDetailEditingViewController.m
//  TengyunStation
//
//  Created by Johnny on 15/9/2.
//  Copyright (c) 2015年 xingrong. All rights reserved.
//

#import "ExpressDetailEditingViewController.h"
#import "ExpressDetail.h"
#import "ExpressDetailEditingCell.h"

@interface ExpressDetailEditingViewController ()

@end

@implementation ExpressDetailEditingViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = @"修改运单";
    }
    return self;
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.tableView reloadData];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.    
    self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 10)];
}

#pragma mark UITableViewDataSource,UITableViewDelegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 200;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIndentifier2 = @"ExpressDetailEditingCell";
    ExpressDetailEditingCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIndentifier2];
    if (!cell) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"ExpressDetailEditingCell" owner:self options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    cell.vc = self;
    [cell reloadExpressDetailEditingCell:self.express];
    return cell;
}

- (void)dealloc {
    self.express = nil;
}

@end
